import { LoginAPI } from '../API';
import { LoginActionType } from '../const';

/**
 * 执行登录
 * @param {loginName:'',password:'',code:''} param
 */
export const doLogin = (param) => {
  console.log(param);
  return (dispatch) => {
    dispatch({
      type: LoginActionType.LOGIN,
      payload: LoginAPI.doLogin(param),
    });
  };
};
